3.37 \(\int \frac {\cos (a+\frac {b}{x})}{x^2} \, dx\)

Optimal. Leaf size=13 \[ -\frac {\sin \left (a+\frac {b}{x}\right )}{b} \]

[Out]

-sin(a+b/x)/b

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3380, 2637} \[ -\frac {\sin \left (a+\frac {b}{x}\right )}{b} \]

Antiderivative was successfully verified.

[In]

Int[Cos[a + b/x]/x^2,x]

[Out]

-(Sin[a + b/x]/b)

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3380

Int[((a_.) + Cos[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Cos[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Simpl
ify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rubi steps

\begin {align*} \int \frac {\cos \left (a+\frac {b}{x}\right )}{x^2} \, dx &=-\operatorname {Subst}\left (\int \cos (a+b x) \, dx,x,\frac {1}{x}\right )\\ &=-\frac {\sin \left (a+\frac {b}{x}\right )}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 13, normalized size = 1.00 \[ -\frac {\sin \left (a+\frac {b}{x}\right )}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[a + b/x]/x^2,x]

[Out]

-(Sin[a + b/x]/b)

________________________________________________________________________________________

fricas [A]  time = 0.93, size = 15, normalized size = 1.15 \[ -\frac {\sin \left (\frac {a x + b}{x}\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x)/x^2,x, algorithm="fricas")

[Out]

-sin((a*x + b)/x)/b

________________________________________________________________________________________

giac [A]  time = 0.36, size = 15, normalized size = 1.15 \[ -\frac {\sin \left (\frac {a x + b}{x}\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x)/x^2,x, algorithm="giac")

[Out]

-sin((a*x + b)/x)/b

________________________________________________________________________________________

maple [A]  time = 0.02, size = 14, normalized size = 1.08 \[ -\frac {\sin \left (a +\frac {b}{x}\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a+b/x)/x^2,x)

[Out]

-sin(a+b/x)/b

________________________________________________________________________________________

maxima [A]  time = 2.00, size = 13, normalized size = 1.00 \[ -\frac {\sin \left (a + \frac {b}{x}\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x)/x^2,x, algorithm="maxima")

[Out]

-sin(a + b/x)/b

________________________________________________________________________________________

mupad [B]  time = 0.26, size = 13, normalized size = 1.00 \[ -\frac {\sin \left (a+\frac {b}{x}\right )}{b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(a + b/x)/x^2,x)

[Out]

-sin(a + b/x)/b

________________________________________________________________________________________

sympy [A]  time = 0.98, size = 15, normalized size = 1.15 \[ \begin {cases} - \frac {\sin {\left (a + \frac {b}{x} \right )}}{b} & \text {for}\: b \neq 0 \\- \frac {\cos {\relax (a )}}{x} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(a+b/x)/x**2,x)

[Out]

Piecewise((-sin(a + b/x)/b, Ne(b, 0)), (-cos(a)/x, True))

________________________________________________________________________________________